package command_pattern;

import command_pattern.command.LightOnCommand;
import command_pattern.command.LightOffCommand;

/**
 * @author liwuji
 * @date 2023/12/26
 * @desc
 **/
public class CommandPatternDemo {
    public static void main(String[] args) {
        ControlPanel controlPanel = new ControlPanel();
        Light light = new Light();
        controlPanel.setCommands(0, new LightOnCommand(light));
        controlPanel.setCommands(0, new LightOffCommand(light));
    }
}
